<template>
	<view>
		<view class="colltion" @click="handle">
			<view class="cover" v-if="proData.apiTypeState == 1">
				<u--image :src="proData.imgUrl" width="315rpx" height="406rpx" :lazy-load="true"></u--image>
			</view>
			<view class="cover" v-else>
				<view v-if="proData.collectionType == 2 && !proData.locked">
					<view class="collectionBck">
						<view class="collectionImgs">
							<image class="" src="/static/img/lock.png" mode=""></image>
							<view class="text">
								<view class="font">
									活动期间未解锁
								</view>
								<view class="font fontText">
									藏品将自动销毁
								</view>
							</view>
							<view class="collectionBtn">
								去解锁
							</view>
						</view>
					</view>
					<!-- <image :src="proData.imgUrl" class="imgs" mode=""></image> -->
					<u--image :src="proData.imgUrl" class="imgs" width="315rpx" height="406rpx" :lazy-load="true">
					</u--image>
				</view>
				<view v-else>
					<u--image :src="proData.imgUrl" width="315rpx" height="406rpx" :lazy-load="true"></u--image>
				</view>
			</view>
			<view class="colltion-title border-box">
				{{proData.name}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			proData: Object,
			collectionStorageIndex: Number,
			indexs: Number
		},
		methods: {
			handle() {
				this.$emit('click', this.proData)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.cover {
		position: relative;

		.collectionBck {
			color: #FFFFFF;
			background: rgba(28, 34, 53, .9);

			position: absolute !important;
			top: 0;
			z-index: 9;
			left: 0;
			right: 0;
			bottom: 0;
			width: 100%;
			height: 100%;

			.collectionImgs {
				width: 100%;
				text-align: center;
				padding-top: 66rpx;

				.text {
					font-size: 26rpx;
					line-height: 42rpx;
					margin: 30rpx 0 60rpx;
				}

				.collectionBtn {
					background: #000000;
					border-radius: 30rpx;
					padding: 12rpx 10rpx;
					font-size: 24rpx;
					width: 50%;
					margin: auto;
				}

				image {
					width: 54rpx;
					height: 54rpx;
				}
			}
		}
	}

	.colltion {
		border: 2rpx solid #313131;
		border-radius: 10rpx;
		overflow: hidden;
		width: 315rpx;
		box-sizing: border-box;

		.colltion-title {
			background: #1c222d;
			border-radius: 0 0 10rpx 10rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			color: white;
			font-size: $uni-font-size-base;
			padding: 30rpx 10rpx;
		}
	}
</style>
